﻿CREATE TABLE [dbo].[OnlinePaymentOrderInfo] (
    [OnlinePaymentID]      UNIQUEIDENTIFIER NOT NULL,
    [PayNo]                VARCHAR (64)     NOT NULL,
    [PayParamHash]         NVARCHAR (MAX)   NOT NULL,
    [TradeNo]              VARCHAR (64)     NULL,
    [RawData]              NVARCHAR (MAX)   NULL,
    [PayServicePlatform]   TINYINT          NOT NULL,
    [PayLaunchPlatform]    TINYINT          NOT NULL,
    [PayBusinessID]        VARCHAR (64)     NOT NULL,
    [CreationTime]         DATETIME         NOT NULL,
    [LastModificationTime] DATETIME         NULL,
    [PlatformAppId]        VARCHAR (64)     NULL,
    [TotalFee]             INT              NOT NULL,
    [UserID]               BIGINT           NOT NULL,
    [PayTitle]             NVARCHAR (200)   NOT NULL,
    [PayDescription]       NVARCHAR (500)   NULL,
    [FeeType]              TINYINT          NOT NULL,
    [PayStatus]            TINYINT          NOT NULL,
    [ResultCode]           VARCHAR (32)     NULL,
    [ResultErrMsg]         NVARCHAR (200)   NULL,
    CONSTRAINT [PK_ONLINEPAYMENTORDERINFO] PRIMARY KEY CLUSTERED ([OnlinePaymentID] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付结果描述', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'ResultErrMsg';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付结果Code', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'ResultCode';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付状态', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付币种', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'FeeType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付描述', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayDescription';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付标题', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayTitle';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'用户标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'UserID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'TotalFee';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付平台标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PlatformAppId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'LastModificationTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'CreationTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付商户号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayBusinessID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付发起平台', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayLaunchPlatform';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付服务商', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayServicePlatform';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付结果原始数据', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'RawData';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付流水号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'TradeNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付参数哈希值。支付参数不同代表着不同的支付记录', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayParamHash';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付单号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'PayNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'支付标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo', @level2type = N'COLUMN', @level2name = N'OnlinePaymentID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'线上支付单信息', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'OnlinePaymentOrderInfo';

